using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace DX_SourceOutliner
{
    public class TreeProcessorSelector
    {
        public IEnumerable<ITreeProcessor> GetProcessors(NodeOptions options)
        {
            IList<ITreeProcessor> processors = new List<ITreeProcessor>();

            if (!options.ShowAllDocumentsInTree)
                processors.Add(new ActiveDocumentOnlyProcessor(options.ActiveDocumentName));

            if (options.FilterActive && !string.IsNullOrEmpty(options.FilterPattern))
                processors.Add(new FilterByNameProcessor(options.FilterPattern));

            return processors;
        }

    }
}
